package com.tuananh.radnom.model.discovery;

import java.util.ArrayList;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;

import com.tuananh.radnom.model.AbstractConfiguration;
import com.tuananh.radnom.model.DirectoryConfig;
import com.tuananh.radnom.model.netservice.NetServiceConfiguration;
import com.tuananh.radnom.model.protocol.service.AbstractDiscover;
import com.tuananh.radnom.model.protocol.service.ActiveDiscover;
import com.tuananh.radnom.model.protocol.service.PassiveDiscover;

@XmlRootElement(name = "discover-conf")
public class DiscoveryConfiguration extends AbstractConfiguration {
	public static String path = "../config/discover/discover.xml";
	static {
		path = DirectoryConfig.configPaths.get(DiscoveryConfiguration.class
				.getName());
	}
	{
		configPath = path;
	}

	/**
	 * 
	 */
	private static final long serialVersionUID = 1126589774599694054L;
	ArrayList<ActiveDiscover> activeDiscovers;
	ArrayList<PassiveDiscover> passiveDiscovers;

	@XmlElementWrapper(name = "ActiveDiscover")
	@XmlElement(name = "discover")
	public ArrayList<ActiveDiscover> getActiveDiscovers() {
		return activeDiscovers;
	}

	public void setActiveDiscovers(ArrayList<ActiveDiscover> activeDiscovers) {
		this.activeDiscovers = activeDiscovers;
	}

	@XmlElementWrapper(name = "PassiveDiscover")
	@XmlElement(name = "discover")
	public ArrayList<PassiveDiscover> getPassiveDiscovers() {
		return passiveDiscovers;
	}

	public void setPassiveDiscovers(ArrayList<PassiveDiscover> passiveDiscovers) {
		this.passiveDiscovers = passiveDiscovers;
	}

	boolean activeDiscover;
	boolean passiveDiscover;

	@XmlAttribute
	public boolean getActiveDiscover() {
		return activeDiscover;
	}

	public void setActiveDiscover(boolean activeDiscover) {
		this.activeDiscover = activeDiscover;
	}

	@XmlAttribute
	public boolean getPassiveDiscover() {
		return passiveDiscover;
	}

	public void setPassiveDiscover(boolean passiveDiscover) {
		this.passiveDiscover = passiveDiscover;
	}

	@Override
	public AbstractConfiguration clone() {
		// TODO Auto-generated method stub
		return null;
	}

}
